# This is a Python3 Script used to generate blockstate files of colorful gekotas
import json

colors = ["black","blue","brown","cyan","gray","green","light_blue","light_gray","lime","magenta","orange","pink","purple","red","white","yellow"]

# Model Template
def getColor(color):
    return {
      "variants": {
        "facing=east": {
          "model": "misaka:block/gekota/gekota_" + color,
          "y": 90
        },
        "facing=north": {
          "model": "misaka:block/gekota/gekota_" + color
        },
        "facing=south": {
          "model": "misaka:block/gekota/gekota_" + color,
          "y": 180
        },
        "facing=west": {
          "model": "misaka:block/gekota/gekota_" + color,
          "y": 270
        }
      }
    }

# Colorful Gekotas...
for col in range(0, len(colors)):
    with open('gekota_' + colors[col] + '.json', 'w+') as f:
        data = json.dumps(getColor(colors[col]), sort_keys=True, indent=4, separators=(',', ': '))
        f.write(data)
